package com.cloud.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cloud.entity.SysRole;

public interface SysRoleMapper extends BaseMapper<SysRole>{
    
    @Select("select t1.* from sys_role t1 LEFT JOIN sys_user_role t2 ON t2.role_id = t1.role_id where t2.user_id = #{userId}")
	List<SysRole> selectUserByUserId(@Param("userId") Integer userId);
}